package org.jeecg.modules.inOrder1.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.inOrder1.entity.InOrderZi;
import org.jeecg.modules.inOrder1.mapper.InOrderZiMapper;
import org.jeecg.modules.inOrder1.service.IInOrderZiService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 入库单子表
 * @Author: jeecg-boot
 * @Date:   2024-01-04
 * @Version: V1.0
 */
@Service
public class InOrderZiServiceImpl extends ServiceImpl<InOrderZiMapper, InOrderZi> implements IInOrderZiService {
	
	@Autowired
	private InOrderZiMapper inOrderZiMapper;
	
	@Override
	public List<InOrderZi> selectByMainId(String mainId) {
		return inOrderZiMapper.selectByMainId(mainId);
	}

	@Override
	public List<InOrderZi> selectByMainIdAndPalletCode(String id, String palletCode) {
		LambdaQueryWrapper<InOrderZi> wrapper = Wrappers.lambdaQuery();
		wrapper.eq(InOrderZi::getPid, id);
		wrapper.eq(InOrderZi::getPalletCode, palletCode);
		return inOrderZiMapper.selectList(wrapper);
	}
}
